package Cars;
public class Person {
	String name;
	private String password;

	Person(String name, String password) {
		this.name = name;
		if (this.password == null) {
			this.password = password;
		}
	}

	public void changePassword(String oldPassword, String newPassword,
			String newPassword2) {
		if (this.password.equals(oldPassword)) {
			if (newPassword.equals(newPassword2)) {
				this.password = newPassword;
			} else
				System.out.println("The new passwords are not the same!");
		} else
			System.out.println("Wrong old password!");
	}
}
